// Fix the keepupright

local function Load()
	local function Keepupright(Entity, Ang, Bone, Angular)
		local Constraint = constraint.Keepupright(Entity, Ang, Bone, Angular)
		
		if (Constraint.Ent) then Constraint.Ent1 = Constraint.Ent end
		
		return Constraint
	end
	
	duplicator.RegisterConstraint("Keepupright", Keepupright, "Ent1", "Ang", "Bone", "angularlimit")
end

ContraptionSaver.Hooks.Add("Initialize", Load)